package tedu.api.file;

import java.io.File;

public class ListFilesDemo3 {
    public static void main(String[] args) {
        File dir = new File(".");
        System.out.println(dir.length());
        if(dir.isDirectory()){
            File[] subs = dir.listFiles(f->f.getName().endsWith(".txt"));
            for(File f : subs){
                System.out.println(f.getName());
            }
        }

    }
}
